﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ArasPLMExtend
{
    public static  class CommonFunction
    {
        /// <summary>
        /// 根据输入的文件夹路径，获取文件夹下的所有文件
        /// </summary>
        /// <param name="folderPath">文件夹路径</param>
        /// <param name="showView">ListView显示文件</param>
        public static void getFileList(string folderPath,System.Windows.Forms.ListView showView)
        {
            showView.Items.Clear();
            DirectoryInfo TheFolder = new DirectoryInfo(folderPath);
            foreach(FileInfo myfile in TheFolder.GetFiles())
            {
                showView.Items.Add(myfile.Name,0);
            }
        }
    }
}
